﻿#ifndef _IDATASET_OPERATOR_H_H_
#define _IDATASET_OPERATOR_H_H_

#include "udatabase/interface/idataset.h"
#include "udatabase/interface/idatasource.h"
#include "udatabase/dll_cfg.h"
#include "kernel/Referenced.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
			/// <summary>
			/// 数据集操作类，用于支持数据集最基本的操作。
			/// </summary>
			class FD_DB_Export IDatasetOperator : public FD::Kernel::CReferenced
			{
			public:					
				/// <summary>
				/// 默认析构函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual ~IDatasetOperator();
				/// <summary>
				/// 获取Operator对应的数据集类型
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual FD::Utility::DB::Interface::DatasetType getDatasetType();
				/// <summary>
				/// 获取Operator对应的数据数据源类型
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual FD::Utility::DB::Interface::DataSourceType getDataSourceType();
				/// <summary>
				/// 打开数据集
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>

				virtual bool openDataset(FD::Kernel::DataStream &stream,const String &name);
				/// <summary>
				/// 创建数据集
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				///virtual UINT32 createDataset(bool UNDEFINEPARAMETER);
				/// <summary>
				/// 删除数据集
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual bool deleteDataset(const String &name);
				/// <summary>
				/// 获取数据源引用
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual FD::Utility::DB::Interface::IDataSource* getDataSourceRef();
				/// <summary>
				/// 克隆自身
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				virtual IDatasetOperator* clone() const;

			protected:
				/// <summary>
				/// 默认构造函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				IDatasetOperator();
			private:
				/// <summary>
				/// 拷贝构造函数
				/// </summary>
				/// <param name=""></param>
				/// <returns></returns>
				C_DISABLE_COPY(IDatasetOperator);
			};
		}
	}
	}
}
#endif